const type = '1' //  1-正式环境 2-测试环境
let api, wx, url, redirectUri
// let vConsole = new window.VConsole()
if (type === '1') {
  api = {
    host: '/p/10/0/5/180/6888/ormrpc/RestServer', // 正式
    // host: 'http://10.0.5.180:6888/ormrpc/RestServer',
    // host: '/p/10/0/5/107/6894/ormrpc/RestServer',
    bzhost: '/p/10/75/1/215/8080',
    bzImg: '/p/10/75/1/215/8080/operation/upload/',
    helphost: '/vank/',
    tokenhost: '/p/172/31/1/145/8101/',
    GXUrl: '/p/172/31/1/228/8888',
    K2Url: '/workflowInterface/k2/MainService.asmx/'
  }
  url = {
    invoice: 'http://t1.vanke.com:6888/invoice/#/?tmp=' + new Date().getTime(),
    my: 'http://t1.vanke.com:6888/#/?tmp=' + new Date().getTime(),
    // 额度详情
    myquota: 'http://t1.vanke.com:6888/#/myquota?tmp=' + new Date().getTime(),
    bxaccount: 'http://t1.vanke.com:6888/#/bxaccount?tmp=' + new Date().getTime(),
    travelbilldetail: 'http://t1.vanke.com:6888/#/travelbilldetail?tmp=' + new Date().getTime()
  }
  redirectUri = 'http://t1.vanke.com:6888/ksbx/#/login'
} else {
  api = {
    // host: 'http://10.0.5.180:6888/ormrpc/RestServer', // 正式
    host: '/p/10/0/5/164/6888/ormrpc/RestServer', // 测试
    // host: 'http://10.0.5.164:6888/ormrpc/RestServer', // 测试
    bzhost: '/p/10/75/1/215/8080',
    bzImg: '/p/10/75/1/215/8080/operation/upload/',
    helphost: '/vank/',
    tokenhost: '/p/172/31/1/145/8101/',
    GXUrl: '/p/10/75/1/212/8084',
    K2Url: '/p/10/0/40/3/8090/workflowInterface/k2/MainService.asmx/' // 测试
  }
  url = {
    invoice: 'http://t1.vanke.com:6888/invoiceTest/#/?tmp=' + new Date().getTime(),
    my: 'http://t1.vanke.com:6888/grzxTest/#/',
    // 额度详情
    myquota: 'http://t1.vanke.com:6888/grzxTest/#/myquota',
    bxaccount: 'http://t1.vanke.com:6888/grzxTest/#/bxaccount',
    travelbilldetail: 'http://t1.vanke.com:6888/grzxTest/#/travelbilldetail'

    // invoice: 'http://localhost:8088/#/',
    // my: 'http://localhost:8088/#/',
    // // 额度详情
    // myquota: 'http://localhost:8088/#/myquota',
    // bxaccount: 'http://localhost:8088/#/bxaccount',
    // travelbilldetail: 'http://localhost:8088/#/travelbilldetail'
  }
  redirectUri = 'http://t1.vanke.com:6888/ksbxTest/#/login'
}
const GX = {
  servicecode: 'CheckInvoice',
  clientcode: 'FK',
  finalKey: 'ImageCenter'
}
// 微信部分的配置
wx = {
  appid: 'wx45362d8e0247a7c7', // vanke
  agentid: '3',
  link: 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx45362d8e0247a7c7&redirect_uri=' + encodeURIComponent(redirectUri) + '&response_type=code&scope=snsapi_userinfo&agentid=3&state=state#wechat_redirect',
  redirectUri
}
export default {
  type,
  api,
  wx,
  GX,
  url
}
